package com.google.wave.bliper;

import com.google.wave.api.RobotMessageBundle;
import com.google.wave.bliper.api.*;
import com.google.wave.bliper.eventhandler.NewbieHandler;
import com.google.wave.bliper.eventhandler.ParticipantsChangedHandle;

/**
 * Extend the class AbstractBliper
 * @author Paulo Romano
 * @version 1.00
 *
 */
public class Bliper extends AbstractBliper {
	protected NewbieHandler newbie;
	
	/**
	 * Default constructor
	 * @param bundle Robot Message Bundle
	 */
	Bliper(RobotMessageBundle bundle){
		super(bundle);
		this.assignHandlers();
		
		//The robot should be initiated at here to prevent null point excepts
		this.init();
	}
	
	/**
	 * Assign handlers to the event handle
	 */
	protected void assignHandlers(){
		newbie = new NewbieHandler();
		this.eventHandle.addSelfAddedListener(newbie);
		this.eventHandle.addParticipantsChanged(new ParticipantsChangedHandle());
			
	}
}
